Returns a System.IO.Stream that can read the specified file.
Parent Type: FileSystemPackageReader
Namespace: Microsoft.LearningComponents
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public override Stream GetFileStream ( ) |
filePath
The package-relative path to the file. If this path indicates a file that is not in the package, a System.IO.FileNotFoundException is thrown.
A System.IO.Stream for the specified file.
| Exception type | Condition |
| ArgumentException | filePath contains one or more invalid characters, or contains a wildcard character. |
| ArgumentNullException | filePath is a null reference. |
| PathTooLongException | The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters. |
| FileNotFoundException | The file specified was not found. |
| NotSupportedException | filePath is in an invalid format. |
| Name | Description |
| System.Security.Permissions.FileIOPermission | for reading files. Associated enumeration: System.Security.Permissions.FileIOPermissionAccess.Read. |
filePath is a relative path to the packageBasePath parameter of the FileSystemPackageReader constructor.